#ifndef __CUE_H__
#define __CUE_H__

struct cue_cdtime
{
	int	mins;
	int	secs;
	int	frames;
};

struct cue_track_part {
	struct cue_cdtime start_time;

	char	*filepath;
	int	part_type;
};

struct cue_track
{
	char	*songwriter;
	char	*performer;
	char	*title;

	struct cue_track_part **parts;
	int	parts_count;
	int	parts_size;

	int	track_position;
};

struct cue_cd
{
	char	*songwriter;
	char	*performer;
	char	*title;

	struct cue_track **tracks;
	int	tracks_count;
	int	tracks_size;
};

extern void fill_cue_cdtime(struct cue_cdtime *, int _mins, int _secs, int _frames);

extern struct cue_track_part *create_cue_track_part();
extern void destroy_cue_track_part(struct cue_track_part *);

extern struct cue_track *create_cue_track();
extern void destroy_cue_track(struct cue_track *);
extern int add_cue_track_part(struct cue_track *, struct cue_track_part *);
extern int get_cue_track_parts_count(struct cue_track *);
extern struct cue_track_part *get_cue_track_part(struct cue_track *, int);

extern struct cue_cd *create_cue_cd();
extern void destroy_cue_cd(struct cue_cd *);
extern int add_cue_track(struct cue_cd *, struct cue_track *);
extern int get_cue_tracks_count(struct cue_cd *);
extern struct cue_track *get_cue_track(struct cue_cd *, int);

#endif
